package test;

import org.apache.log4j.Logger;

import java.util.concurrent.*;

import static java.lang.Thread.sleep;

/**
 * @author user_xdd
 * @Date 2022-04-06 12:53
 * @description
 * @return
 */
public class thread {
    private static final Logger LOGGER = Logger.getLogger(thread.class);
    public static int Count = 1;

    public static void main(String[] args) throws ExecutionException, InterruptedException {
//这里默认拒绝策略为AbortPolicy
        ExecutorService executorService = new ThreadPoolExecutor(3, 300,
                6000l, TimeUnit.MILLISECONDS,
                new LinkedBlockingQueue<Runnable>());
        for(int i=0;i<100;i++){
            executorService.submit(new threadRun());
            executorService.submit(new threadRun2());
        }






    }
}
